#!/usr/bin/env ruby

require "sugoi_aliases_updator"

cli = SugoiAliasesUpdator::Cli.new(ARGV)
cli.check_input

include SugoiAliasesUpdator
aliases_parser = AliasesParser.new(cli.filepath)

case cli.command
when 'add'
  puts aliases_parser.add(cli.target_email, cli.direction_labels)
when 'rm', 'del'
  puts aliases_parser.rm(cli.target_email, cli.direction_labels)
when 'list', 'show'
  puts aliases_parser.list(cli.target_email)
end
